<?php
/**
 * Created by PhpStorm.
 * User: yellow
 * Date: 2019/7/15
 * Time: 12:16
 */

namespace app\common\model;


use think\Model;

class DeliveryBus extends Model
{

    public function business(){
        return $this->hasOne('bus_business', 'id', 'business_id')->bind([
            'business_name'=>'name'
        ]);
    }

    public function bus(){
        return $this->hasOne('bus', 'id', 'bus_id')->bind([
            'bus_no'
        ]);
    }

    public function delivery(){
        return $this->hasOne('delivery', 'id', 'delivery_id')->bind('price');
    }

    public function driver(){
        return $this->hasOne('bus_driver', 'id', 'driver_id')->bind([
            'driver_name'=>'name'
        ]);
    }

}